
public class Data {
    public int year;
    public int month;
    public int day;

    public Data() {

        System.out.println("执行了无参数的构造方法");
    }
    public void print() {
        System.out.println(this.year+"/"+this.month+"/"+this.day);
    }
   public Data(int year,int month,int day) {
       this.year = year;
       this.month = month;
       this.day = day;
   }

    public Data(int year, int month) {
        this.year = year;
        this.month = month;
    }

    public Data(int day) {
        this.day = day;
    }

    public static void main(String[] args) {
        Data data = new Data();
        Data data1 = new Data(1999,9,9);
        data.print();
        data1.print();
    }

}
